# Makefile - (C) Chris Dorman, 2022 <cddo@riseup.net>

PREFIX = /usr/local
CC = gcc

CFLAGS = -O2
LDFLAGS = 

BIN=openedit
SRCS=$(wildcard src/*.c)

OBJECTS=$(SRCS:%.c=%.o)

all: main

fresh: clean all

main: $(OBJECTS)
	$(CC) $(OBJECTS) -o $(BIN) $(LDFLAGS) $(CFLAGS)

clean:
	 rm -f $(OBJECTS) $(BIN)
    
install:
	cp $(BIN) $(PREFIX)/bin/$(BIN)
